home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import Forms.AchievementsPopupForm;
- import Forms.BaseForm;
- import Forms.CluelessBaseForm;
- import Forms.DressupResultForm;
-
- public class AchievementsList
- {
-
- public static const NUM_PARTNERS:int = 8;
-
- public static const PARTNER_MATCH_NUM:int = 40;
-
- public static const OCCASION_MATCH_NUM:int = 50;
-
-
- public function AchievementsList()
- {
- super();
- }
-
- public static function incrementOccasionGood(param1:String) : void
- {
- var _loc2_:Boolean = false;
- _loc2_ = Profile.CurrentProfile.Achievements.incrementPairCounterLimit(param1,"TotalOccasionGoodMatches",OCCASION_MATCH_NUM);
- if(_loc2_)
- {
- trace("Occasion match partner : " + param1);
- showAchievement(param1.toLowerCase());
- }
- }
-
- public static function showAchievement(param1:String) : *
- {
- var _loc2_:AchievementsPopupForm = null;
- var _loc3_:CluelessBaseForm = null;
- _loc2_ = new AchievementsPopupForm();
- _loc2_.init(param1);
- _loc3_ = BaseForm.getCurrentForm() as CluelessBaseForm;
- if(_loc3_ != null)
- {
- _loc3_.hideMouseCursor();
- }
- BaseForm.setForm(_loc2_,true);
- Profile.CurrentProfile.Achievements.incrementPairCounter(param1,"Unlocked");
- }
-
- public static function checkAffinities() : void
- {
- var _loc1_:Boolean = false;
- var _loc2_:Partner = null;
- _loc1_ = true;
- for each(_loc2_ in Database.getInstance().Partners)
- {
- if(Profile.CurrentProfile.Affinities.getPairCounter(_loc2_.TargetModel,_loc2_.Name) < DressupResultForm.PARTNER_CUTSCENE_2)
- {
- _loc1_ = false;
- break;
- }
- }
- if(_loc1_)
- {
- showAchievement("golden");
- }
- }
-
- public static function incrementPerfect(param1:String) : void
- {
- var _loc2_:Boolean = false;
- var _loc3_:int = 0;
- _loc3_ = PARTNER_MATCH_NUM;
- _loc2_ = Profile.CurrentProfile.Achievements.incrementPairCounterLimit(param1,"TotalPerfectMatches",_loc3_);
- if(_loc2_)
- {
- showAchievement(param1.toLowerCase());
- }
- }
- }
- }
-